import request from "@/utils/request";

//用户分页查询
export const queryPageApi=(data)=>{
  return request.get(`/users`,{params:data})
}

//获取所有部门列表
export const queryAllApi=()=>{
  return request.get(`/depts/list`)
}

//获取所有角色列表
export const queryAllRolesApi=()=>{
  return request.get(`/roles/list`)
}

//添加用户
export const addApi=(data)=>{
  return request.post(`/users`,data)
}

//根据ID查询
export const queryById=(id)=>{
  return request.get(`/users/${id}`)
}

//修改用户
export const updateApi=(data)=>{
  return request.put(`/users`,data)
}

//删除用户
export const deleteApi=(ids)=>{
  return request.delete(`/users/${ids}`)
} 